Java SE 7 Programming Essentials by Michael Ernest

Java SE 7 Programming Essentials by Michael Ernest
Author: Michael Ernest
Language: eng
Format: epub
Publisher: Sybex
Published: 2012-10-22

Review Questions

1. If you declare a class final, you cannot do which of the following: A. Make an object of that type

B. Recompile the code

C. Subclass it

D. Use it as a field type in another class

2. True or false: Package-private access is more lenient than protected access.

3. Which of the following statements apply to package declarations in a Java source code file? (Choose all that apply.) A. There has to be a top-level package name that contains no classes.

B. You have to tell the compiler where to create the package structure in the filesystem.

C. The classpath has to include the top-level package name.

D. A source-code file without a package declaration is treated like a package.